package com.wu01.demo.newdemo.demo;

/**
 * @author wubingcang
 * @desc
 * @date 2024年04月21日 17:23
 */
 class Horse {
    public String identifyMyself() { // 实例方法
        return "I am a horse.";
    }
}

interface Flyer {
   default public String identifyMyself() { // 默认方法
       return "I am able to fly.";
   }
}
 interface Mythical {
    default public String identifyMyself() { // 默认方法
        return "I am a mythical creature.";
    }
}
public class Pegasus extends Horse implements Flyer, Mythical {
    public static void main(String... args) {
        Pegasus myApp = new Pegasus();
        System.out.println(myApp.identifyMyself());
    }
}